package cn.liujianbo.example.pattern.strategy.enums;

/**
 * @author 刘建波
 * @date 2022-04-02 10:39
 */
public enum CashEnum {
    CASH_NORMAL{
        @Override
        public double acceptCash(double money) {
            return 0;
        }
    },

    CASH_REBATE{
        @Override
        public double acceptCash(double money) {
            return money*0.8;
        }
    },
    CASH_RETURN{
        @Override
        public double acceptCash(double money) {
            return money>300? money-10:money;
        }
    }
    ;

    public abstract double acceptCash(double money);
}
